author: Diogo Silva
In [1]:
%pylab inline
In [3]:
cd ~/QCThesis/
In [4]:
import seaborn as sns
from sklearn.cluster import KMeans as KMeans_skl
import MyML.cluster.eac as eac
import MyML.cluster.K_Means3 as K_Means
import MyML.metrics.accuracy as accuracy
In [ ]:
center1=(0,0)
center2=(10,10)
cov1=1
cov2=1
n1=100
n2=100
nsamples=n1+n2
dim=2
g1 = np.random.normal(loc=center1,scale=cov1,size=(n1,dim))
g2 = np.random.normal(loc=center2,scale=cov2,size=(n2,dim))
data = np.vstack((g1,g2))
gt=np.zeros(data.shape[0],dtype=np.int32)
gt[100:]=1
figData=plt.figure()
plt.plot(g1[:,0],g1[:,1],'.')
plt.plot(g2[:,0],g2[:,1],'.')